<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"

      xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <h:form id="cepForm" enctype="multipart/form-data">
                <p:growl id="msg" life="4000"/>
                <h1 class="title">Escrituras</h1>

                <div class="row">
                    <div class="twelve columns"> 
                        <fieldset>
                            <legend> <h4 style="margin:0 0 10px 0">ReadFile</h4></legend>
                            <p:panel id="charterPanel" style="background: none; border: none;" 
                                     styleClass="container_24 clearfix ">
                                <p:inputTextarea cols="100" value="#{managerBackup.livrosString}" />
                                <p:commandButton  value="Backup Escritura" icon="ui-icon-disk" 
                                                  update="@form" id="btnBackup"
                                                  actionListener="#{managerBackup.backup()}" 
                                                  styleClass="ui-priority-primary grid_5" />
                                <p:inputTextarea cols="100" value="#{managerBackup.livrosStringProcuracao}" />
                                <p:commandButton  value="Backup Procuracao" icon="ui-icon-disk" 
                                                  update="@form" id="btnBackup2"
                                                  actionListener="#{managerBackup.backupProcuracao()}" 
                                                  styleClass="ui-priority-primary grid_5" />
                                <p:blockUI block="fileTable" trigger="btnBackup2" > 
                                    <p:graphicImage value="media/css/images/ajax-loader.gif"/>
                                </p:blockUI>
                                <p:dataTable id="fileTable" value="#{managerBackup.charters}" var="c" 
                                             paginatorPosition="bottom" paginator="true" rows="10" styleClass="grid_24">
                                    <f:facet name="header">
                                        Arquivos
                                    </f:facet>
                                    <p:column>
                                        #{c}
                                    </p:column>
                                    
                                </p:dataTable>
                            </p:panel>
                        </fieldset>
                    </div>
                </div>
            </h:form>
        </ui:define>
    </ui:composition>

</html>